<?php

/**
 * Subclass for performing query and update operations on the 'account_owner' table.
 *
 * 
 *
 * @package lib.model
 */ 
class AccountOwnerPeer extends BaseAccountOwnerPeer
{
  public static function getList($noblank=false){
    $c = new Criteria();
    $c->addJoin(self::CONTACT_IDEN,ContactPeer::IDEN);
    $c->addAscendingOrderByColumn(ContactPeer::COMPANY_NAME);
    $account_owners = self::doSelect($c);
    if($noblank)
      $owner_list = array();
    else
      $owner_list = array(''=>'');
    foreach($account_owners as $account_owner)
      $owner_list[$account_owner->getContactIden()] = $account_owner->getContact()->getListName();
    return $owner_list;
  }
  
  public static function getListListName(){
    $c = new Criteria();
    $c->addJoin(self::CONTACT_IDEN,ContactPeer::IDEN);
    $c->addAscendingOrderByColumn(ContactPeer::LIST_NAME);
    $account_owners = self::doSelect($c);
    return $account_owners;
  }
}
